package com.aprivate.kn.ratingsystem.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.aprivate.kn.ratingsystem.daoBean.Topics;
import com.aprivate.kn.ratingsystem.daoBean.Answer;
import com.aprivate.kn.ratingsystem.daoBean.User;
import com.aprivate.kn.ratingsystem.daoBean.Elements;
import com.aprivate.kn.ratingsystem.daoBean.Project;
import com.aprivate.kn.ratingsystem.daoBean.Interviewee;
import com.aprivate.kn.ratingsystem.daoBean.ProductInfo;
import com.aprivate.kn.ratingsystem.bean.ProjectUsersBean;

import com.aprivate.kn.ratingsystem.dao.TopicsDao;
import com.aprivate.kn.ratingsystem.dao.AnswerDao;
import com.aprivate.kn.ratingsystem.dao.UserDao;
import com.aprivate.kn.ratingsystem.dao.ElementsDao;
import com.aprivate.kn.ratingsystem.dao.ProjectDao;
import com.aprivate.kn.ratingsystem.dao.IntervieweeDao;
import com.aprivate.kn.ratingsystem.dao.ProductInfoDao;
import com.aprivate.kn.ratingsystem.dao.ProjectUsersBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig topicsDaoConfig;
    private final DaoConfig answerDaoConfig;
    private final DaoConfig userDaoConfig;
    private final DaoConfig elementsDaoConfig;
    private final DaoConfig projectDaoConfig;
    private final DaoConfig intervieweeDaoConfig;
    private final DaoConfig productInfoDaoConfig;
    private final DaoConfig projectUsersBeanDaoConfig;

    private final TopicsDao topicsDao;
    private final AnswerDao answerDao;
    private final UserDao userDao;
    private final ElementsDao elementsDao;
    private final ProjectDao projectDao;
    private final IntervieweeDao intervieweeDao;
    private final ProductInfoDao productInfoDao;
    private final ProjectUsersBeanDao projectUsersBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        topicsDaoConfig = daoConfigMap.get(TopicsDao.class).clone();
        topicsDaoConfig.initIdentityScope(type);

        answerDaoConfig = daoConfigMap.get(AnswerDao.class).clone();
        answerDaoConfig.initIdentityScope(type);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        elementsDaoConfig = daoConfigMap.get(ElementsDao.class).clone();
        elementsDaoConfig.initIdentityScope(type);

        projectDaoConfig = daoConfigMap.get(ProjectDao.class).clone();
        projectDaoConfig.initIdentityScope(type);

        intervieweeDaoConfig = daoConfigMap.get(IntervieweeDao.class).clone();
        intervieweeDaoConfig.initIdentityScope(type);

        productInfoDaoConfig = daoConfigMap.get(ProductInfoDao.class).clone();
        productInfoDaoConfig.initIdentityScope(type);

        projectUsersBeanDaoConfig = daoConfigMap.get(ProjectUsersBeanDao.class).clone();
        projectUsersBeanDaoConfig.initIdentityScope(type);

        topicsDao = new TopicsDao(topicsDaoConfig, this);
        answerDao = new AnswerDao(answerDaoConfig, this);
        userDao = new UserDao(userDaoConfig, this);
        elementsDao = new ElementsDao(elementsDaoConfig, this);
        projectDao = new ProjectDao(projectDaoConfig, this);
        intervieweeDao = new IntervieweeDao(intervieweeDaoConfig, this);
        productInfoDao = new ProductInfoDao(productInfoDaoConfig, this);
        projectUsersBeanDao = new ProjectUsersBeanDao(projectUsersBeanDaoConfig, this);

        registerDao(Topics.class, topicsDao);
        registerDao(Answer.class, answerDao);
        registerDao(User.class, userDao);
        registerDao(Elements.class, elementsDao);
        registerDao(Project.class, projectDao);
        registerDao(Interviewee.class, intervieweeDao);
        registerDao(ProductInfo.class, productInfoDao);
        registerDao(ProjectUsersBean.class, projectUsersBeanDao);
    }
    
    public void clear() {
        topicsDaoConfig.clearIdentityScope();
        answerDaoConfig.clearIdentityScope();
        userDaoConfig.clearIdentityScope();
        elementsDaoConfig.clearIdentityScope();
        projectDaoConfig.clearIdentityScope();
        intervieweeDaoConfig.clearIdentityScope();
        productInfoDaoConfig.clearIdentityScope();
        projectUsersBeanDaoConfig.clearIdentityScope();
    }

    public TopicsDao getTopicsDao() {
        return topicsDao;
    }

    public AnswerDao getAnswerDao() {
        return answerDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public ElementsDao getElementsDao() {
        return elementsDao;
    }

    public ProjectDao getProjectDao() {
        return projectDao;
    }

    public IntervieweeDao getIntervieweeDao() {
        return intervieweeDao;
    }

    public ProductInfoDao getProductInfoDao() {
        return productInfoDao;
    }

    public ProjectUsersBeanDao getProjectUsersBeanDao() {
        return projectUsersBeanDao;
    }

}
